<extend name="Public/base"/>

<block name="body">
	<script type="text/javascript" src="__STATIC__/uploadify/jquery.uploadify.min.js"></script>
    <div class="main-title">
        <h2>{:isset($info['id'])?'编辑':'新增'}分类</h2>
    </div>
	<form action="__SELF__" method="post" class="form-horizontal">
        <div class="form-item">
            <label class="item-label">标题<span class="check-tips">（标题不能为空）</span></label>
            <div class="controls">
                <input type="text" class="text input-large" name="title" value="{$info.title|default=''}">
            </div>
        </div>
        <empty name="pid">
	        <div class="form-item">
	            <label class="item-label">分类模块</label>
	            <div class="controls">
	                <select name="gid">
	                	<volist name="groups" id="vo">
	                		<option value="{$vo.id}" <eq name="info.gid" value="$vo['id']">selected="selected"</eq>>{$vo.name}</option>
	                	</volist>
	                </select>
	            </div>
	        </div>
	    </empty>
        <div class="form-item">
            <label class="item-label">排序<span class="check-tips">（用于分组显示的顺序）</span></label>
            <div class="controls">
                <input type="text" class="text input-small" name="sort" value="{$info.sort|default=0}">
            </div>
        </div>
        <div class="form-item">
            <button class="btn submit-btn ajax-post" id="submit" type="submit" target-form="form-horizontal">确 定</button>
            <button class="btn btn-return" onclick="javascript:history.back(-1);return false;">返 回</button>
            <input type="hidden" name="id" value="{$info.id|default=''}"/>
           	<input type="hidden" name="pid" value="{$pid}"/>
        </div>
    </form>
</block>

<block name="script">
    <script type="text/javascript">
        //导航高亮
        highlight_subnav('{:U('Product/category')}');
    </script>
</block>
